﻿using System.Collections.Generic;

namespace IterationLife.ContentResources.Models {
    /// <summary>
    /// 内容资源
    /// </summary>
    public partial class ContentResource {

        /// <summary>
        /// 设置图集
        /// </summary>
        /// <param name="pictures"></param>
        public void SetPictures(IEnumerable<ContentResourcePicture> pictures)
        {
            ContentResourcePictures.Clear();
            foreach (var item in pictures)
            {
                item.Init();
                item.ContentResourceId = Id;
                ContentResourcePictures.Add(item);
            }
        }
    }
}